<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
  exclude-result-prefixes="msxsl"
  version="1.0">
<xsl:import href="../Common/meta.xsl"/>
<xsl:output method="html" 
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" 
	doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
<xsl:param name="lang" select="'chi'"/>
<xsl:param name="sectionId" select="'HigherEducation'"/>
<xsl:variable name="headers" select="document(/links/header/@href)//header[@lang=$lang]"/>
<xsl:template match = "/">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>
      <xsl:call-template name="title" />
    </title>
    <xsl:call-template name="content-lang" />
    <link rel="stylesheet" type="text/css" media="screen" href="/css/default.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="/css/links/links.min.css" />
    <link rel="stylesheet" type="text/css" media="print" href="/css/print.css" />
    <script type="text/javascript" src="/js/lib/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="/js/lib/hoverIntent.min.js"></script>
    <script type="text/javascript" src="/js/lib/superfish.min.js"></script>
    <script type="text/javascript" src="/js/lib/jquery.cycle.all.min.js"></script>
    <script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
    <script type="text/javascript">
      var pageTracker = _gat._getTracker("UA-3662766-1");
      pageTracker._initData();
      pageTracker._trackPageview();
    </script>
  </head>
  <body>
    <div id="Links">
      <xsl:call-template name="showheader" />
      <xsl:apply-templates select="//section[@id=$sectionId]"/>
      <!--<xsl:call-template name="showfooter" />-->
    </div>
  </body>
</html>
</xsl:template>

<xsl:template name="title">
  <xsl:value-of select="$headers/title"/>
</xsl:template>  

<xsl:template name="showheader">
</xsl:template>

<xsl:template name="showfooter">
  <p><xsl:copy-of select="$headers/contact-info/* | $headers/contact-info/text()"/></p>
</xsl:template>

<xsl:template name="displaysection">
    <xsl:param name="desc" select="desc[@lang=$lang]"/>
    <xsl:param name="link" select="link"/>
    <xsl:param name="headstyle" select="concat('h',count(ancestor::node()))"/>
    <xsl:element name="{$headstyle}">
       <xsl:value-of select="$desc"/>
    </xsl:element>
    <ul>
       <xsl:for-each select="$link">
        <xsl:variable name="href">
         <xsl:choose>
           <xsl:when test="string(item[@lang=$lang]/@href)!=''">
             <xsl:value-of select="item[@lang=$lang]/@href"/>
           </xsl:when>
           <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise>
         </xsl:choose>
        </xsl:variable>

        <li>
        <a href="{$href}" target="new"><xsl:value-of select="item[@lang=$lang]"/></a>
        </li>
       </xsl:for-each>
    </ul>
</xsl:template>

<xsl:template match="section">
  <xsl:call-template name="displaysection"/>
  <xsl:apply-templates select="section"/>
</xsl:template>

</xsl:stylesheet>
